<template>
<div class="up-file" @tap.stop='add'>

    <div class="icon-box">
        <i-icon class="icon" size=42  type="add" />
    </div>
    <span>添加照片</span>
    
</div>
</template>

<script>
export default {
    props: {
        count: 3,
    },
    data: function() {	
        return {
            localUrl:'',
        }
    },

    computed:{
        fileUrl(){
            return 
        }
    },

    methods: {
        add(){
            let _this = this;
            wx.chooseImage({
                count: _this.count,
                sizeType: ['original','compressed'],
                sourceType: ['album','camera'],
                success: (result)=>{
                    _this.$emit('upFile', result)
                },
                fail: ()=>{},
            });            
        }
    }
}
</script>

<style scoped lang='less'>
@size: 180rpx;
.up-file{
    overflow: hidden;
    width: @size;
    height: @size;
    display: inline-block;
    border-radius: 6rpx;
    text-align: center;
    background: @grayColor;
    color: @darkColor;

    span{
        &:extend(.fontSize_small);
    }
}

.icon-box{
    margin-top: 2*@interval;
}



</style>